/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * ControlUtenciliosCocina.java
 *
 * Created on 31/05/2012, 11:20:38 AM
 */

package laboratorio1ayd;

/**
 *
 * @author userlab34
 */
public class ControlUtensiliosCocina extends javax.swing.JFrame {
//creado por herman pablo huitz sac
    /** Creates new form ControlUtenciliosCocina */
    public ControlUtensiliosCocina() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {
        bindingGroup = new org.jdesktop.beansbinding.BindingGroup();

        buttonGroup1 = new javax.swing.ButtonGroup();
        jLabel1 = new javax.swing.JLabel();
        IngresoModificacion = new javax.swing.JTabbedPane();
        pCrear = new javax.swing.JPanel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        pNombreUtencilio = new javax.swing.JTextField();
        jScrollPane1 = new javax.swing.JScrollPane();
        pDescripcion = new javax.swing.JTextArea();
        jLabel4 = new javax.swing.JLabel();
        pCantidad = new javax.swing.JSpinner();
        pBotonCrear = new javax.swing.JButton();
        pModificarEliminar = new javax.swing.JPanel();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jScrollPane2 = new javax.swing.JScrollPane();
        pDescripcion1 = new javax.swing.JTextArea();
        jLabel7 = new javax.swing.JLabel();
        pCantidad1 = new javax.swing.JSpinner();
        pAceptar = new javax.swing.JButton();
        pBuscarUtencilio = new javax.swing.JComboBox();
        jPanel1 = new javax.swing.JPanel();
        peliminar = new javax.swing.JRadioButton();
        pModificar = new javax.swing.JRadioButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Control de Utencilios de Cocina");

        jLabel1.setFont(new java.awt.Font("Arial", 0, 12)); // NOI18N
        jLabel1.setText("Control de los utensilios de cocna:");

        jLabel2.setFont(new java.awt.Font("Arial", 0, 11)); // NOI18N
        jLabel2.setText("Descripcion:");

        jLabel3.setFont(new java.awt.Font("Arial", 0, 11)); // NOI18N
        jLabel3.setText("Nombre:");

        pDescripcion.setColumns(20);
        pDescripcion.setRows(5);
        jScrollPane1.setViewportView(pDescripcion);

        jLabel4.setText("Cantidad:");

        pCantidad.setModel(new javax.swing.SpinnerNumberModel(0, 0, 1000, 1));

        pBotonCrear.setText("Crear");
        pBotonCrear.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                pBotonCrearActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pCrearLayout = new javax.swing.GroupLayout(pCrear);
        pCrear.setLayout(pCrearLayout);
        pCrearLayout.setHorizontalGroup(
            pCrearLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pCrearLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pCrearLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel2)
                    .addComponent(jLabel3)
                    .addComponent(jLabel4))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pCrearLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(pNombreUtencilio)
                    .addComponent(jScrollPane1)
                    .addComponent(pCantidad, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(29, Short.MAX_VALUE))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pCrearLayout.createSequentialGroup()
                .addContainerGap(105, Short.MAX_VALUE)
                .addComponent(pBotonCrear)
                .addGap(105, 105, 105))
        );
        pCrearLayout.setVerticalGroup(
            pCrearLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pCrearLayout.createSequentialGroup()
                .addGap(31, 31, 31)
                .addGroup(pCrearLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel3)
                    .addComponent(pNombreUtencilio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pCrearLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel2)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(pCrearLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(pCantidad, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel4))
                .addGap(18, 18, 18)
                .addComponent(pBotonCrear)
                .addContainerGap(30, Short.MAX_VALUE))
        );

        IngresoModificacion.addTab("Creacion", pCrear);

        jLabel5.setFont(new java.awt.Font("Arial", 0, 11)); // NOI18N
        jLabel5.setText("Nombre:");

        jLabel6.setFont(new java.awt.Font("Arial", 0, 11)); // NOI18N
        jLabel6.setText("Descripcion:");

        pDescripcion1.setColumns(20);
        pDescripcion1.setRows(5);
        jScrollPane2.setViewportView(pDescripcion1);

        jLabel7.setText("Cantidad:");

        pCantidad1.setModel(new javax.swing.SpinnerNumberModel(0, 0, 1000, 1));

        pAceptar.setText("Aceptar");
        pAceptar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                pAceptarActionPerformed(evt);
            }
        });

        pBuscarUtencilio.setModel(new javax.swing.DefaultComboBoxModel(new String[] { " " }));

        peliminar.setText("Eliminar");

        org.jdesktop.beansbinding.Binding binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, buttonGroup1, org.jdesktop.beansbinding.ObjectProperty.create(), peliminar, org.jdesktop.beansbinding.BeanProperty.create("selected"));
        bindingGroup.addBinding(binding);

        pModificar.setText("Modificar");

        binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, buttonGroup1, org.jdesktop.beansbinding.ObjectProperty.create(), pModificar, org.jdesktop.beansbinding.BeanProperty.create("selected"));
        bindingGroup.addBinding(binding);

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(pModificar)
                .addGap(18, 18, 18)
                .addComponent(peliminar)
                .addContainerGap())
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(pModificar)
                    .addComponent(peliminar))
                .addContainerGap())
        );

        javax.swing.GroupLayout pModificarEliminarLayout = new javax.swing.GroupLayout(pModificarEliminar);
        pModificarEliminar.setLayout(pModificarEliminarLayout);
        pModificarEliminarLayout.setHorizontalGroup(
            pModificarEliminarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pModificarEliminarLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pModificarEliminarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pModificarEliminarLayout.createSequentialGroup()
                        .addGroup(pModificarEliminarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel5)
                            .addComponent(jLabel7))
                        .addGroup(pModificarEliminarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(pModificarEliminarLayout.createSequentialGroup()
                                .addGap(17, 17, 17)
                                .addGroup(pModificarEliminarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(pBuscarUtencilio, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(pAceptar)))
                            .addGroup(pModificarEliminarLayout.createSequentialGroup()
                                .addGap(18, 18, 18)
                                .addComponent(pCantidad1, javax.swing.GroupLayout.PREFERRED_SIZE, 76, javax.swing.GroupLayout.PREFERRED_SIZE))))
                    .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(pModificarEliminarLayout.createSequentialGroup()
                        .addComponent(jLabel6)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jScrollPane2)))
                .addContainerGap(29, Short.MAX_VALUE))
        );
        pModificarEliminarLayout.setVerticalGroup(
            pModificarEliminarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pModificarEliminarLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pModificarEliminarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel5)
                    .addComponent(pBuscarUtencilio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pModificarEliminarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel6)
                    .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(pModificarEliminarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel7)
                    .addComponent(pCantidad1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 14, Short.MAX_VALUE)
                .addComponent(pAceptar)
                .addContainerGap())
        );

        IngresoModificacion.addTab("Eliminacion o Modificacion", pModificarEliminar);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(IngresoModificacion, javax.swing.GroupLayout.PREFERRED_SIZE, 274, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel1))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(IngresoModificacion, javax.swing.GroupLayout.PREFERRED_SIZE, 283, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(20, Short.MAX_VALUE))
        );

        bindingGroup.bind();

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void pBotonCrearActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_pBotonCrearActionPerformed
        // TODO add your handling code here:
        
    }//GEN-LAST:event_pBotonCrearActionPerformed

    private void pAceptarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_pAceptarActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_pAceptarActionPerformed

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new ControlUtensiliosCocina().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JTabbedPane IngresoModificacion;
    private javax.swing.ButtonGroup buttonGroup1;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JButton pAceptar;
    private javax.swing.JButton pBotonCrear;
    private javax.swing.JComboBox pBuscarUtencilio;
    private javax.swing.JSpinner pCantidad;
    private javax.swing.JSpinner pCantidad1;
    private javax.swing.JPanel pCrear;
    private javax.swing.JTextArea pDescripcion;
    private javax.swing.JTextArea pDescripcion1;
    private javax.swing.JRadioButton pModificar;
    private javax.swing.JPanel pModificarEliminar;
    private javax.swing.JTextField pNombreUtencilio;
    private javax.swing.JRadioButton peliminar;
    private org.jdesktop.beansbinding.BindingGroup bindingGroup;
    // End of variables declaration//GEN-END:variables

}
